package com.woniu.staff.controller;

import com.woniu.common.util.ResponseData;
import com.woniu.staff.service.StaffService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class LoginController {
    private final StaffService staffService;
    @PostMapping("/login")
    public ResponseData<?> login(@RequestParam("username") String account, @RequestParam("password") String pwd){
        System.out.println("login");
        return staffService.login(account,pwd);
    }
}
